package $___666;

public class Position {
    int x;
    int y;
    public Position(int x, int y) {
        this.x = x;
        this.y = y;
    }public static void main(String[] args) {
        Position sourse = new Position(4, 5);
        Position target = new Position(6, 16);
        for(int i = 1; i <= 21; i++) {
            for(int j = 1; j <= 40; j++) {
                if(i == sourse.y & j == sourse.x || i == target.y & j == target.x) {
                    System.out.print("*");
                }else if(i == 21){
                    System.out.print("_");
                }else if(i != sourse.y | j != sourse.x | i != target.y | j != target.x) {
                    System.out.print(" ");
                }
            }
            System.out.println("|");
        }
        double distance = Math.sqrt((sourse.x - target.x)*(sourse.x - target.x) + 
        (sourse.y - target.y)*(sourse.y - target.y));
        System.out.println(distance);
        
    }
}
